1. Field of the Technology
The present technology relates to a storage medium having a game program stored thereon, a game apparatus, an input device, and a storage medium having a program stored thereon, and more particularly to a storage medium in which stored is a game program used for a computer game for which a pointing device such as a touch panel is employed, a game apparatus, an input device, and a storage medium having a program stored thereon.
2. Description of the Background Art
Conventionally, various types of games for which a joystick is used as a controller have been developed. The joystick is provided with a lever, and a player tilts the lever forward and backward, and rightward and leftward, thereby making inputs according to the directions. In general, a direction in which the joystick is tilted is handled by a game apparatus as an input direction. In a case where the player tilts the joystick lever in a certain direction to hold the joystick lever at that position, the positional information is continuously outputted and handled by the game apparatus as the input direction. The joystick is also used for a typical personal computer as well as used as a controller for a home game apparatus.
On the other hand, an input device which is operated by a player using a touch panel has been also developed, as disclosed in, for example, Japanese Laid-Open Patent Publication No. 11-53115 (Document 1) and Japanese Laid-Open Patent Publication No. 7-182092 (Document 2). With the input device disclosed in the Document 1, as shown in FIG. 1 and FIG. 3 of the Document 1, a player uses a touch panel to utilize, as a direction in which and a speed at which a cursor moves, a direction and a distance from a predetermined origin on the touch panel to a point at which the player is pointing. On the other hand, in the input device disclosed in the Document 2, as shown in FIG. 6 of the Document 2, a game screen is displayed on a display having a touch panel mounted thereon. According to a movement corresponding to a vector quantity of a movement of a finger with which a player touches the touch panel, an object which is selectively touched is moved on the game screen.
Here, if an operation in which a joystick is emulated can be realized for a game apparatus having a touch panel, it is convenient. In this case, information which is eventually required is a vector value of two axes of X and Y corresponding to a joystick input value. The vector value is represented as a vector value (sx, sy) in a stick coordinate system. A direction indicated by the vector value (sx, sy) is a direction in which the joystick is tilted. Further, the length of the vector value corresponding to the joystick being tilted to the maximum is set as “1”. In this case, sx=−1 to +1 and sy=−1 to +1, and the length of “0” indicates that the joystick is in a neutral (upright) position.
Further, the vector value (sx, sy) in the stick coordinate system can be obtained according to the following formula, using an origin (ox, oy) on the touch panel and a point (tx, ty) at which the player is pressing the touch panel, the origin and the point being represented in the touch panel coordinate system.sx=(tx−ox)×ratiosy=(ty−oy)×ratiowhere the ratio is a conversion ratio used for defining a length in the touch panel coordinate system, which corresponds to the length “1” in the stick coordinate system. For example, when a length from an origin is “10” in the touch panel coordinate system, the length is defined as “1” in the stick coordinate system. Consequently, the ratio is set as “ratio=1÷10=0.1”.
While the device disclosed in the Document 1 utilizes, for information processing, a difference between an origin and a point at which a touch panel is being pressed, when the input method of the invention disclosed in the Document 1 is applied as it is to the operation in which a joystick is emulated, various problems arise. With reference to FIGS. 7A and 7B, the problems on the input device disclosed in the Document 1 will be described. In FIGS. 7A and 7B, the horizontal direction is the X axis direction (the rightward direction is the positive direction) and the vertical direction is the Y axis direction (the forward direction is the positive direction) in the touch panel coordinate system. O is the origin in the touch panel coordinate system. FIGS. 7A and 7B show an example of an operation in which a player uses the touch panel to shift from a stick input vertically in front of the origin (an input for tilting the joystick vertically in front of the origin; an input by which sx=0 and sy>0 is obtained as the stick coordinate values) to a stick input on the right side of the origin (an input for tilting the joystick directly to the right; an input by which sx>0 and sy=0 is obtained as the stick coordinate values). FIGS. 7A and 7B schematically illustrate a mark representing a hand as a player's hand that presses the touch panel.
In FIG. 7A, in a case where the stick input vertically in front of the origin is performed on the touch panel, the player presses a point T1 (t1x, t1y) which is in front of the origin O (ox, oy) (which is in the direction which is parallel to the Y axis and in which the Y value increases) on the touch panel. Based on the origin O (ox, oy) and the point T1 (t1x, t1y), a vector value V1 oriented vertically in front of the origin can be obtained.
On the other hand, in FIG. 7B, in a case where the stick input on the right side of the origin is performed on the touch panel, the player must press a point T2 (t2x, t2y) which is to the right of the origin O (ox, oy) (which is the direction which is parallel to the X axis and in which the X value increases) on the touch panel. Based on the origin O (ox, oy) and the point T2 (t2x, t2y), a vector value V2 oriented to the right can be obtained. Accordingly, when the stick input vertically in front of the origin is shifted to the stick input on the right side of the origin on the touch panel, the player must press the touch panel aiming at the touch point which is in the right backward direction as seen from the point T1, as shown by the dotted lines in FIG. 7B. That is, in the case of the stick input on the right side of the origin being desired, the player attempts to move the pressing point in the rightward direction (the direction which is parallel to the X axis and in which the X value increases) of the point at which the player is currently pointing (it is also convenient for the player to do so), whereas when the point at which the player is currently pointing deviates vertically from the origin, it is not sufficient to move the pressing point in the rightward direction. For example, in a case where the point at which the player is currently pointing is in front of the origin, it is necessary to move the pressing point in the right backward direction in order to make the stick input on the right side of the origin, and thereby the difference between controllability of a joystick and controllability of a touch panel confuses the player operating the touch panel and it is necessary to constantly confirm the position of the origin. Since a frame for guiding a lever is provided for the joystick in practice, for example, in a case where a rightward tilting force is applied to the lever being tilted in the maximum forward direction, the lever is naturally moved in the right backward direction along the guide, and the lever is eventually tilted in the maximum rightward direction. However, in a case where an operation in which a joystick is emulated using a touch panel is realized, since there is no guide as described above, the player must intentionally move the pressing point in the right backward direction. Further, in the case of an actual joystick, since the player can perceive how the lever is being tilted with his finger or hand, it is not necessary to visually confirm the origin of the joystick. However, in a case where an operation in which a joystick is emulated using a touch panel is realized, since it is impossible to perceive the origin with a finger, it is necessary to visually confirm the position of the origin.
A method for relatively moving a cursor according to a movement trace of a player's finger is also disclosed in the Document 1. Further, a method for moving an object which is selectively touched on a game screen according to a movement corresponding to a vector of a movement of a finger with which a player touches a touch panel is disclosed in the Document 2. In these methods, however, since the input is not made until the players' finger moves, the input for which a joystick is emulated cannot be realized. This is because an actual joystick continuously supplies a constant output when a lever is held at a predetermined position. More specifically, in a case where a game object is moved according to a movement corresponding to a vector of a movement of a finger which touches the touch panel, the finger must be continuously moved in order to move the game object.